#!/usr/bin/make -f

dhopt:=
build_cpu:=$(shell dpkg-architecture -qDEB_BUILD_ARCH_CPU)

#Raspberry PI cannot survive through parallel building
ifeq ($(build_cpu),arm)
dhopt:= --no-parallel
endif

cfgopt:= @GMSSL_CFGOPT@ @OPENSSL_CFGOPT@ @FUSE3_CFGOPT@ @KRB5_CFGOPT@ @JAVA_CFGOPT@ @PYTHON_CFGOPT@ @TEST_CFGOPT@ @JS_CFGOPT@

%:
	dh $@ $(dhopt)

override_dh_auto_configure:
	dh_auto_configure -- $(cfgopt) "CPPFLAGS=-O2 -g3 -DRELEASE -D_DEBUG=0 -fno-strict-aliasing"
